package org.jason.backstage.service.impl;

import org.jason.backstage.service.UserService;
import org.jason.feign.user.UserClient;
import org.jason.model.common.dtos.ResponseResult;
import org.jason.model.common.enums.HttpCodeEnum;
import org.jason.model.user.pojos.CuUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserClient userClient;


    /**
     * 获取用户表
     *
     * @return
     */
    @Override
    public ResponseResult<List<CuUser>> getUserTable() {
        List<CuUser> userTable = userClient.getUserTable();
        return new ResponseResult<>(HttpCodeEnum.SUCCESS, userTable);
    }
}
